//
//  GHYCameraViewController.m
//  Camera
//
//  Created by aaaaaa on 16/8/10.
//  Copyright © 2016年 葛海一. All rights reserved.
//

#import "GHYCameraViewController.h"
#import "GHY_CameraComponent.h"


@interface GHYCameraViewController ()

@property (nonatomic, retain) GHY_CameraComponent *camera;


@end

@implementation GHYCameraViewController

- (void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    self.navigationController.navigationBar.hidden = YES;
    self.isHiddenStatus = YES;
    [self prefersStatusBarHidden];
    
}


- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    self.navigationController.navigationBar.hidden = NO;
//    self.isHiddenStatus = NO;
//    [self prefersStatusBarHidden];
    self.camera.viewWillDisAppear();
    
}

- (void)viewDidLoad {
    [super viewDidLoad];


    self.camera = [[GHY_CameraComponent alloc] initWithFrame:self.view.bounds];
    self.camera.controller = self;    
    [self.view addSubview:self.camera];
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
